﻿Public Class frmMain
    Private WithEvents ThayDoiQuiDinh As frmThayDoiQuiDinh
    Private WithEvents PhieuNhapSach As frmPhieuNhapSach
    Private WithEvents HoaDonBanSach As frmHoaDonBanSach
    Private WithEvents DanhSachSach As frmDanhSachSach
    Private WithEvents DanhSachKhachHang As frmDanhSachKhachHang
    Private WithEvents QuanLySach As frmQuanLySach
    Private WithEvents QuanLyTheLoaiSach As frmQuanLyTheLoaiSach
    Private WithEvents PhieuThuTien As frmPhieuThuTien
    Private WithEvents QuanLyKhachHang As frmQuanLyKhachHang
    Private WithEvents ThongTin As frmThongTin
    Private WithEvents BaoCaoCongNo As frmBaoCaoCongNo
    Private WithEvents BaoCaoton As frmBaoCaoTon
    Dim hCtrl As HomeControl

    Private Sub biThayDoiQuiDinh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biThayDoiQuiDinh.Click
        ThayDoiQuiDinh = New frmThayDoiQuiDinh
        ThayDoiQuiDinh.Show()
    End Sub

    Private Sub biPhieuNhapSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biPhieuNhapSach.Click
        PhieuNhapSach = New frmPhieuNhapSach
        PhieuNhapSach.Show()
    End Sub

    Private Sub ButtonItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem16.Click
        Me.Close()
        frmWelcome.Close()
    End Sub

    Private Sub biHoaDonBanSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biHoaDonBanSach.Click
        HoaDonBanSach = New frmHoaDonBanSach
        HoaDonBanSach.Show()
    End Sub

    Private Sub biTimSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biTimSach.Click
        DanhSachSach = New frmDanhSachSach
        DanhSachSach.Show()
    End Sub

    Private Sub biDanhSachSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biDanhSachSach.Click
        DanhSachSach = New frmDanhSachSach
        DanhSachSach.Show()
    End Sub

    Private Sub biQuanLySach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biQuanLySach.Click
        QuanLySach = New frmQuanLySach
        QuanLySach.Show()
    End Sub

    Private Sub biTimKhachHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biTimKhachHang.Click
        DanhSachKhachHang = New frmDanhSachKhachHang
        DanhSachKhachHang.Show()
    End Sub

    Private Sub biBaoCaoTon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biBaoCaoTon.Click
        BaoCaoton = New frmBaoCaoTon
        BaoCaoton.Show()
    End Sub

    Private Sub biBaoCaoCongNo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biBaoCaoCongNo.Click
        BaoCaoCongNo = New frmBaoCaoCongNo
        BaoCaoCongNo.Show()
    End Sub

    Private Sub biThongTin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biThongTin.Click
        ThongTin = New frmThongTin
        ThongTin.Show()
    End Sub

    Private Sub biQuanLyTheLoaiSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biQuanLyTheLoaiSach.Click
        QuanLyTheLoaiSach = New frmQuanLyTheLoaiSach
        QuanLyTheLoaiSach.Show()
    End Sub

    Private Sub biPhieuThuTien_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biPhieuThuTien.Click
        PhieuThuTien = New frmPhieuThuTien
        PhieuThuTien.Show()
    End Sub

    Private Sub biDanhSachKhachHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biDanhSachKhachHang.Click
        DanhSachKhachHang = New frmDanhSachKhachHang
        DanhSachKhachHang.Show()
    End Sub

    Private Sub biQuanLyKhachHang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biQuanLyKhachHang.Click
        QuanLyKhachHang = New frmQuanLyKhachHang
        QuanLyKhachHang.Show()
    End Sub

    Private Sub biSach1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biSach1.Click
        DanhSachSach = New frmDanhSachSach
        DanhSachSach.Show()
    End Sub

    Private Sub biKhachHang1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biKhachHang1.Click
        DanhSachKhachHang = New frmDanhSachKhachHang
        DanhSachKhachHang.Show()
    End Sub

    Private Sub ButtonItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem6.Click
        ThayDoiQuiDinh = New frmThayDoiQuiDinh
        ThayDoiQuiDinh.Show()
    End Sub

    Private Sub ButtonItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonItem4.Click
        pnMain.Controls.Clear()

        If hCtrl Is Nothing Then hCtrl = New HomeControl
        pnMain.Controls.Add(hCtrl)
    End Sub

    Private Sub biSach_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles biSach.Click

    End Sub
End Class
